import {
    request
} from "./request";
import qs from "qs";

// 获取 全部操作人
export function getSaleUser(obj) {
    return request({
        url: "user/getSaleUser",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 添加 操作人
export function addSaleUser(obj) {
    return request({
        url: "user/addSaleUser",
        method: "post",
        data: obj.user,
        params: {
            areaIdList: obj.areaIdList
        }
    });
}
// 启用 操作人
export function updateSaleUserUp(obj) {
    return request({
        url: "user/updateSaleUserUp",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 禁用 操作人
export function updateSaleUserDown(obj) {
    return request({
        url: "user/updateSaleUserDown",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 添加推广员 区域
export function addpromoterArea(obj) {
    return request({
        url: "user/addpromoterArea",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 获取推广员的负责区域
export function listMyArea(obj) {
    return request({
        url: "user/listMyArea",
        method: "post",
        data: qs.stringify(obj)
    });
}
//获取业务员负责区域及该业务员所负责区域内没有投放的所有门店
export function listUserAdvShop(obj) {
    return request({
        url: "user/listUserAdvShop",
        method: "post",
        data: qs.stringify(obj)
    });
}
//获取 施工员全部的打卡记录
export function listShopVisit(obj) {
    return request({
        url: "user/listShopVisit",
        method: "post",
        data: qs.stringify(obj)
    });
}


// 审核 打卡记录
export function applyShopVisit(obj) {
    return request({
        url: "user/applyShopVisit",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 获取佣金申请列表
export function listCommission(obj) {
    return request({
        url: "commission/listCommission",
        method: "post",
        data: qs.stringify(obj)
    });
}
//  发放佣金  审核通过
export function passCommission(obj) {
    return request({
        url: "commission/passCommission",
        method: "post",
        data: qs.stringify(obj)
    });
}


//  获取工人佣金记录  
export function listGMoney(obj) {
    return request({
        url: "user/listGMoney",
        method: "post",
        data: qs.stringify(obj)
    });
}
